<template>
	<view>
		<u-navbar :is-back="true" title="我的钱包" title-color="white" :border-bottom="false"
			:background="{backgroundColor: '#00a8ff'}"></u-navbar>
		<view class="u-p-l-26 u-p-r-26 top_card" style="background: url(../../../../static/icon/moneybg.png);">
			<text>总资产（元）</text>
			<view class="u-p-l-10">
				<text style="font-size: 60rpx;">¥ 2459.50</text>
				<u-button shape="circle" type="primary" plain size="mini"
					style=" width: 120rpx;padding: 0 20rpx;float: right;"
					@click="openinfo('/pages/tabBar/my/myMoney/Withdraw')">提现</u-button>
			</view>
			<view class="u-p-t-26 u-p-b-26">
				<text class="top_card_text">今日收益：¥258.00</text>
				<text class="top_card_text" style="float: right;">累计收益：¥258.00</text>
			</view>
		</view>
		<view class="u-p-r-26 u-p-l-26 bottom_card" style="position: relative;">
			<text>账单记录</text>
			<view class="" style="width: 80%;">
				<u-tabs-swiper activeColor="#44a3ff" ref="tabs" :list="list" :current="current" @change="change"
					:is-scroll="false" swiperWidth="750"></u-tabs-swiper>
			</view>
			<u-dropdown style="width: 20%;position: absolute;right: 26rpx;top: 10%;">
				<u-dropdown-item v-model="value1" title="今天" :options="options1"></u-dropdown-item>
			</u-dropdown>
			<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
				@animationfinish="animationfinish">
				<swiper-item class="swiper-item">
					<view class="u-padding-26 u-m-t-26 u-m-b-26 bg"
						@click="openinfo('/pages/order/lineOff/seeShow/seeShow')">

					</view>
				</swiper-item>
				<swiper-item class="swiper-item">
					<scroll-view scroll-y style="height: 100%;width: 100%;">
						进行中
					</scroll-view>
				</swiper-item>
				<swiper-item class="swiper-item">
					<scroll-view scroll-y style="height: 100%;width: 100%;">
						<view class="page-box">
							已完成
						</view>
					</scroll-view>
				</swiper-item>
				<swiper-item class="swiper-item">
					<scroll-view scroll-y style="height: 100%;width: 100%;">
						<view class="page-box">
							已完成
						</view>
					</scroll-view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1: 1,
				value2: 2,
				options1: [{
						label: '今天',
					},
					{
						label: '近一月',
						value: 2,
					},
					{
						label: '近一年',
						value: 3,
					}
				],
				list: [{
						name: '全部'
					},
					{
						name: '在线问诊'
					},
					{
						name: '线下问诊',
					},
					{
						name: '其他',
					}
				],
				current: 0,
				swiperCurrent: 0,
			}
		},
		methods: {
			openinfo(url) {
				uni.navigateTo({
					url: url,
				});
			},
			// tab栏切换
			change(index) {
				this.swiperCurrent = index;
			},
			transition({
				detail: {
					dx
				}
			}) {
				this.$refs.tabs.setDx(dx);
			},
			animationfinish({
				detail: {
					current
				}
			}) {
				this.$refs.tabs.setFinishCurrent(current);
				this.swiperCurrent = current;
				this.current = current;
			}
		}
	}
</script>

<style scoped lang="scss">
	.top_card {
		color: #FFFFFF;
		background-color: #00a8ff;
	}

	.top_card_big {
		display: inline-block;
		font-size: 40rpx;
	}

	.top_card_text {

		font-size: 26rpx;

	}
</style>
